<?php 
	$this->load->view('header');
	$this->load->view('header_end');
?>
<script type="text/javascript" src="<?php echo base_url()?>js/jquery.simplePagination.js"></script>
<link type="text/css" rel="stylesheet" href="<?php echo base_url()?>css/simplePagination.css"/>   
<style type="text/css">
.page_items{display:none;}
.blog_item {overflow:hidden;}
.img_left{width:145px;float:left;}
.img_left img{width:140px;} 
.content_right{width:560px;margin:0 10px 0 10px;}
.clear_space{clear:both;height:15px;border-bottom:1px dotted #069;margin-bottom:10px;}
</style>
<div id="block_menu_banner">
	<?php 
		$this->load->view('part_view/mod_menu'); 
	?>
</div>
<div id="content">
            <div class="clear"></div>
            <div id="content-left">
			
			<?php if(isset($obj_data[0]['csection_news']) AND isset($obj_data[0]['ccat_news'])){?>
			<h3 class="title_page" style="border-bottom: 1px dotted #069;margin-bottom: 20px;margin-top: 10px;color:#069;"><?php echo $obj_data[0]['csection_news'].' - '.$obj_data[0]['ccat_news'] ?></h3>
			<?php }?>
              <?php foreach($obj_data as $data){?>
			  <div class="blog_item">
			  	<div class="img_left"><a href="<?php echo base_url().'tin-tuc/'.$data['nid']?>"><img src="<?php echo base_url().'upload/image_article/'.$data['cimage_thumb']?>" /></a></div>
				<div class="content_right">
					<h2><a href="<?php echo base_url().'tin-tuc/'.$data['nid']?>"><?php echo $data['ctitle']?></a></h2><br />
					<a href="<?php echo base_url().'tin-tuc/'.$data['nid']?>"><?php echo $data['cshort_content']?></a>
				</div>
			  </div>
			  <div class="clear_space"></div>
			  <?php }?>
			  <div class="pagination">
              <div class="page_numbers" id="paging_tag">
               </div>
               <?php if($ntotal_row>0){ ?>
               <p class="page_items"><?php echo ($ncurrent_page -1)*$nrow_per_page +1?> - <?php if($ncurrent_page*$nrow_per_page < $ntotal_row) echo  $ncurrent_page*$nrow_per_page ;else echo $ntotal_row; ?> / <?php echo $ntotal_row;?> </p>
               <?php }?>
            </div>
            </div>
			
			
			
            <div id="content-right">               
               <?php 
					$this->load->view('part_view/mod_right_index.php'); 
				?>
               
            </div>
            <div class="clear"></div>
         </div>
		 <?php if($ntotal_row >$nrow_per_page){ ?>
		   <script type="text/javascript">
  	$(function() {
		$(".page_numbers").pagination({
			items: <?php echo $ntotal_row?>,
			itemsOnPage: <?php echo $nrow_per_page?>,
			currentPage:<?php echo $ncurrent_page?>,
			displayedPages:10,
			cssStyle: 'light-theme',
			edges:1,
			hrefTextPrefix:'<?php echo base_url()?>c/page/'+<?php echo $nid_section;  ?>+'/'+<?php echo $nid_cat;  ?>+'/',
			prevText:'',
			nextText:''
		});
	});
  </script>
<?php 
}
	$this->load->view('footer');
?>
